package com.ruoyi.project.chargesystem.service.impl;

import com.ruoyi.project.chargesystem.domain.CharMedCase;
import com.ruoyi.project.chargesystem.domain.CharMedCaseMedical;
import com.ruoyi.project.chargesystem.domain.CharMedReg;
import com.ruoyi.project.chargesystem.mapper.CharMedRegMapper;
import com.ruoyi.project.chargesystem.service.ICharMedRegService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ICharMedRegServiceImpl implements ICharMedRegService {
    @Autowired
    private CharMedRegMapper charMedRegMapper;
    @Override
    public CharMedReg selectCharMedRegInfo(String regID) {
        CharMedReg charMedReg = charMedRegMapper.selectCharMedRegInfo(regID);
        CharMedCase charMedCase = charMedRegMapper.selectCharMedCaseInfo(regID);
        List<CharMedCaseMedical> charMedCaseMedicals = charMedRegMapper.selectCharMedCaseMedicalInfo(regID);
        System.out.println(charMedReg);
        System.out.println(charMedCase);
        charMedReg.setCharMedCase(charMedCase);
        charMedReg.setList(charMedCaseMedicals);
        return charMedReg;
    }
}
